package p.ithorns.integration.hazelcast.mqtt;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @Author: liuhaitao
 * @Date: 2022/8/17 18:33
 * @Description:
 */
@Getter
@Setter
@ToString
@ConfigurationProperties(prefix = "app.mqtt")
public class MqttClientProps {

    public final static String TCP = "tcp://";

    public final static String SSL = "ssl://";

    public final static String CLIENT_ID = "ESL_BS_SERVER";

    public final static long TIME_OUT = 5000L;

    public final static int QOS = 1;

    public final static int NUM_OF_RETRY = 5;

    private String broker = "127.0.0.1";

    private int port = 1883;

    private String username = "admin";

    private String password = "admin";

    private boolean hasSsl = false;

    private boolean withUserNamePass = true;

    private int qos = QOS;

    /**
     * 心跳超时
     * 单位: 秒
     */
    private int keepalive = 60;

    /**
     * 最大连接数
     */
    private int maxInflight = 10000;


    public String[] topics;

    /**
     * 是否开启日志
     */
    private boolean enableLog;

}
